home *** CD-ROM | disk | FTP | other *** search
/ Video Toaster 4.2 / Video Toaster v4.2.iso / arexx / switcher / 9650rec.rexx < prev    next >
OS/2 REXX Batch file  |  1993-12-13  |  2KB  |  70 lines

  1. /* Record frames on Sony EVO-9650 */
  2. /* Set serial at 9600 8N1 */
  3. /* Wed Nov  4 13:00:21 1992 */
  4.  
  5. arg timecode count name
  6.  
  7. NextFrame=x2c("2B")
  8.  
  9. OPTIONS RESULTS
  10. TOASTERLIB="ToasterARexx.port"
  11.  
  12. IF POS(TOASTERLIB , SHOW('Libraries')) = 0 THEN
  13.   IF ~ADDLIB(TOASTERLIB , 0) THEN x=Bummer(" Me No Find Toaster Library!")
  14.  
  15. if ~open(SerialOut,"SER:","a") then
  16.     do
  17.         say "Can't open serial port SER:."
  18.         exit
  19.     end
  20.  
  21. Switcher(TOSW)
  22. Switcher(GOLD)    /* Set keypad to frame loading */
  23. RecordFrame("00:00:10:00")
  24. Switcher(DOEN)    /* hit enter key to load */
  25. Switcher(TAKE)    /* Do whatever transition is selected */
  26. N=Switcher(STAT,KNUM) /* Get the current keypad number, so we know where we started */
  27. Switcher(KEYP)    /* hit the '+' key */
  28. do While Switcher(STAT,KNUM)~=N   /* Go until we return to the starting frame */
  29.   Switcher(DOEN)    /* hit enter key to load */
  30.   RecordNextFrame()
  31.   Switcher(KEYP)    /* hit the '+' key */
  32.   Switcher(TAKE)    /* Do whatever transition is selected */
  33.   end
  34.  
  35. Switcher(TOWB)
  36. exit
  37.  
  38. /* Make code like hh:mm:ss:ff into sony style bytes */
  39. MakeTC: PROCEDURE
  40.   arg TimeCode  /* Conveniently, ASCII of the hex numbers are the numbers themselves */
  41.   return space(translate(TimeCode,'',':'))||'@'
  42.  
  43. FindFrame: PROCEDURE  EXPOSE SerialOut
  44.   arg TimeCode
  45.   cmd=x2c(df93)
  46.   cmd=cmd||MakeTC(TimeCode)
  47.     writech(SerialOut,cmd)
  48.   return cmd
  49.  
  50. RecordFrame: PROCEDURE  EXPOSE SerialOut
  51.   arg TimeCode
  52.   edit_preset_cmd=x2c(dfC0)||'240@'
  53.     writeln(SerialOut,edit_preset_cmd)
  54.   in_entry_cmd=x2c(de98)||MakeTC(TimeCode)
  55.     writeln(SerialOut,in_entry_cmd)
  56.   rec_dur_cmd=x2c(df92)||'0001@'
  57.     writeln(SerialOut,rec_dur_cmd)
  58.   address command "wait 20 secs"
  59.   return cmd
  60.  
  61. RecordNextFrame: PROCEDURE  EXPOSE SerialOut
  62.   rec_dur_cmd=x2c(df92)||'0001@'
  63.     writeln(SerialOut,rec_dur_cmd)
  64.   address command "wait 15 secs"
  65.   return cmd
  66.  
  67.  
  68.  
  69.  
  70.